#!/usr/bin/env python3
# -*- coding: utf-8 -*-

"""
文档转换器 Web 应用
支持 Word、Markdown、PDF 之间的相互转换
"""

import os
import sys

# 添加后端路径到系统路径
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'backend'))

from backend.app import create_app
from backend.config_manager import config_manager

def main():
    """启动应用"""
    app = create_app()
    
    # 从配置文件读取主机和端口
    host = config_manager.get_server_host()
    port = config_manager.get_server_port()
    debug = config_manager.get_server_debug()
    
    app.run(debug=debug, host=host, port=port)

if __name__ == "__main__":
    main() 